Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
The is-object npm package is a simple utility that checks if a given value is an object. It is useful for type-checking in JavaScript, ensuring that a value is an object and not another type like a string, number, or array.
Basic Object Check
This feature allows you to check if a given value is an object. The function returns true for plain objects and false for arrays, null, strings, and other non-object types.
const isObject = require('is-object');
console.log(isObject({})); // true
console.log(isObject([])); // false
console.log(isObject(null)); // false
console.log(isObject('string')); // false
The lodash.isobject package is a part of the Lodash library, which provides utility functions for common programming tasks. lodash.isobject checks if a value is an object, similar to is-object, but it is part of a larger suite of utilities, making it more versatile for various tasks.
The is-plain-object package checks if a value is a plain object, i.e., an object created by the Object constructor or with a null prototype. It is more specific than is-object, which checks for any object type.
The isobject package is another utility for checking if a value is an object. It is similar to is-object but includes additional checks to ensure the value is not an array or null.
Checks whether a value is an object
Because typeof null
is a troll.
var isObject = require("is-object")
console.log(isObject(null)) // false
console.log(isObject(require("util"))) // true
npm install is-object
FAQs
Checks whether a value is an object
The npm package is-object receives a total of 1,343,885 weekly downloads. As such, is-object popularity was classified as popular.
We found that is-object demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.